/**
 * 
 */
package com.nextive.interview.dto;

/**
 * DTO class containing information about a single phone contact.
 * @author Cesar Roman
 *
 */
public class ContactDetails {
	
	/**
	 * Contact's name.
	 */
	private String name;
	
	/**
	 * Contact's email.
	 */
	private String email;
	
	/**
	 * Default constructor.
	 * @param name contact's name
	 * @param email contact's email
	 */
	public ContactDetails(String name, String email) {

		this.name = name;
		this.email = email;
		
	}

	/**
	 * It returns a formatted version of name + email.
	 * @return
	 */
	@Override
	public String toString() {
		
		return new StringBuffer()
			.append(name)
			.append(" ( ")
			.append(email)
			.append(" )")
			.toString();
		
	}

	/**
	 * It returns the contact's name.
	 * @return contact's name
	 */
	public String getName() {
		return name;
	}

	/**
	 * It returns the contact's email.
	 * @return contact's email
	 */
	public String getEmail() {
		return email;
	}

}